package com.boolib.scheck.util;

import org.springframework.core.io.ClassPathResource;

import java.io.IOException;

public class ClassPathUtil {

    /**
     * 获取文件绝对路径
     * @return
     */
    public static  String getPath(String filename){
        try {
            return new ClassPathResource(filename).getFile().getAbsolutePath();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
